<template>
  <div class="dashboard-container">
    <div class="dashboard-text">
      {{ name }},欢迎您使用 云基建, <span v-if="enabled">到期时间：<font style="color: red" v-text="expiredTime"></font></span><br>
      <p v-if="enabled"><a style="color: blue" href="" target="_blank">点击续费</a></p>
      <span v-if="!enabled">当前为试用版本，{{expiredTime}}到期后无法使用，请尽快购买服务后继续使用。</span>
      <p v-if="!enabled"><a style="color: blue" href="" target="_blank">购买服务</a></p>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name',
      'enabled',
      'expiredTime'
    ])
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
